<?php

namespace app\user\controller;
use cmf\controller\UserBaseController;
use think\Db;
use think\Request;

class UserhandlerController extends UserBaseController{
    public function getUserInfo(){
        $param = Request::instance()->param();
        $userToken = Db::name('user_token')->where('token', $param['token'])->find();
        $user = Db::name('user')
        ->field(['user_type',
        		 'create_time',
        		 'id',
        		 'balance',
                 'mobile',
        		 'user_nickname',
        		 'avatar'])->where(['id'=>$userToken['user_id']])->find();
        $this->result($user,1,'请求成功','json',[], 'status');
    }
}